package com.es.config;

import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Configuration;

import com.es.filter.IndexFilter;

@Configuration
public class FilterConfig {
	
	/**
	 * 注册 IndexFilter
	 * @return
	 */
	 public FilterRegistrationBean<IndexFilter> indexFilter(){
		 FilterRegistrationBean<IndexFilter> filterRegistrationBean = new FilterRegistrationBean<IndexFilter>();
		 filterRegistrationBean.setFilter(new IndexFilter());
		 return filterRegistrationBean;
	 }
}
